package ac.rsync.download;

import java.io.IOException;

//稍微测试一下。

public class Main {

	public static void main(String[] args) throws IOException {

		test4();

		System.out.println("\n\n===============\nFinished.");

	}

	public static void test1() throws IOException {

		Task task = new Task();

		task.setDownURL("http://61.152.235.21/qqfile/qq/2007iistable/QQ2007IIKB1.exe");

		task.setSaveFile("H:/Test2.exe");

		task.setSectionCount(200);

		task.setWorkerCount(100);

		task.setBufferSize(256 * 1024);

		TaskAssign ta = new TaskAssign();

		ta.work(task);

	}

	public static void test2() throws IOException {

		Task task = new Task();

		task
				.setDownURL("http://student1.scut.edu.cn:8880/manage/news/data/1208421861893.xls");

		task.setSaveFile("H:/Test3.xls");

		task.setSectionCount(5);

		task.setWorkerCount(1);

		task.setBufferSize(128 * 1024);

		TaskAssign ta = new TaskAssign();

		ta.work(task);

	}

	public static void test3() throws IOException {

		Task task = new Task();

		task.setDownURL("http://go.microsoft.com/fwlink/?linkid=57034");

		task.setSaveFile("H:/vc2005express.iso");

		task.setSectionCount(500);

		task.setWorkerCount(200);

		task.setBufferSize(128 * 1024);

		TaskAssign ta = new TaskAssign();

		ta.work(task);

	}

	public static void test4() throws IOException {

		Task task = new Task();

		task.setDownURL("http://down.sandai.net/Thunder5.7.9.472.exe");

		task.setSaveFile("D:/Thunder.exe");

		task.setSectionCount(5);

		task.setWorkerCount(5);

		task.setBufferSize(32 * 1024);

		TaskAssign ta = new TaskAssign();

		ta.work(task);

	}
}